<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8"/>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="viewport" content="target-densitydpi=640,width=1280,user-scalable=yes">
    <base href="<?php echo $system['siteRoot'];?>" />
    <title>用户 - 我的账户</title>
    <?php import_tpl("fragment/icon.php"); ?>
    <link rel="stylesheet" href="plugin/reset.css"/>
    <link rel="stylesheet" href="plugin/awesome4/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="style/common.css"/>
    <link rel="stylesheet" href="style/recharge-window.css"/>
    <script src="plugin/jquery-1.11.2.min.js"></script>
    <script type="text/javascript">
    (function(){
        $(function(){
            //console.log( $('.slide .commodity'))
            $('.slide .account').addClass('menu-normal').removeClass('menu-label')    
        })
    })()
    </script>
    <script type="text/javascript">_root='<?php echo $system['siteRoot'];?>'</script>
    <script src="script/api.js"></script>
    <script src="script/goods-account.js"></script>
</head>
<body>
<div id="container" class="index">
    <?php import_part("custom.home","userBar"); ?>
    <?php import_part("custom.home","header"); ?>
    <?php import_tpl("fragment/nav.php"); ?>
    <div class="main-container">
        <div class="left">
            <?php import_tpl("fragment/mySlide.php"); ?>
            <div class="qr-code-box">
                <img src="images/weixin.png" alt="扫描二维码关注" title="关注我们的微信"/>
                <div>
                    <p class="weixin">扫描二维码</p>
                    <p class="concern">关注我们的微信</p>
                </div>
            </div>
        </div>
        <div class="right">
            <div class="rest">
                <div class="wap">我的账户</div>
                <div class="rest-money">
                    <p>当前余额&nbsp;&nbsp;&nbsp;&nbsp;￥<span class="rest-money-amount"><?=$r['money'] ?></span></p>
                    <button class="recharge-money">充值</button>
                </div>
            </div>
            <div class="order">
                <div class="wap">账单明细</div>
                <div class="bill-consult">
                    <a href="<?php e_page('my','account',array('type'=>'out')) ?>" class="<?php if($r['type']=='out') echo 'select' ?>"><span>支出</span></a>
                    <a href="<?php e_page('my','account',array('type'=>'in')) ?>" class="<?php if($r['type']=='in') echo 'select' ?>"><span>收入</span></a>
                    <a href="<?php e_page('my','account') ?>" class="<?php if($r['type']=='all'||$r['type']=='') echo 'select' ?>"><span>支出/收入</span></a>
                    <a href="<?php e_page('my','account',array('type'=>'share')) ?>" class="<?php if($r['type']=='share') echo 'select' ?>"><span>分享分成</span></a>
                    <a href="<?php e_page('my','account',array('type'=>'buy')) ?>" class="<?php if($r['type']=='buy') echo 'select' ?>"><span>代购分成</span></a>
                    <a href="<?php e_page('my','account',array('type'=>'serviceFee')) ?>" class="<?php if($r['type']=='serviceFee') echo 'select' ?>"><span>服务费</span></a>
                    <a href="<?php e_page('my','account',array('type'=>'shopSell')) ?>" class="<?php if($r['type']=='shopSell') echo 'select' ?>"><span>订单结算款</span></a>
                </div>
            </div>
            <div class="bill-detail">
                <table>
                    <tr class="bill-attribute">
                        <td class="bill-ID">ID</td>
                        <td class="bill-content">支付内容</td>
                        <td class="money-change">金额变化</td>
                        <td class="present-money">当时金额</td>
                        <td class="bill-remark">备注</td>
                    </tr>
                    <?php foreach ($r['list'] as $v) {?>
                        <tr>
                            <td class="bill-ID"><?=$v['id']?></td>
                            <td class="bill-content"><?=$v['event']?></td>
                            <td class="money-change"><?=$v['money']>=0?'收入':'支付' ?> <span class="<?=$v['money']>0?"money-add":'' ?>"><?=$v['money']?>元</span></td>
                            <td class="present-money"><?=$v['total']?>元</td>
                            <td class="bill-remark"><?=$v['remark']?></td>
                        </tr>
                    <?php }?>
                </table>
            </div>
        </div>
        <?php if($r['page'] instanceof Page && !$r['pageEmpty']){
            $page=$r['page'];?>
            <div class="turn-page">
                <?php if($page->ifPrev()) { ?>
                    <a href="<?=$page->getPageUrl($page->getPrev());?>"><i class="fa fa-chevron-left"></i>上一页</a>
                <?php }?>
                <?php foreach($page->getPageArray() as $i){ ?>
                    <a href="<?=$page->getPageUrl($i);?>"><?php echo $i;?></a>
                <?php } ?>
                <?php if($page->ifNext()) { ?>
                    <a href="<?=$page->getPageUrl($page->getNext());?>">下一页<i class="fa fa-chevron-right"></i></a>
                <?php }?>
            </div>
        <?php } ?>
    </div>
    <?php import_tpl("fragment/footer.php"); ?>
</div>
<div class="alert-bg recharge">
    <div class="alert-box">
        <form action="<?php e_page('order','addCash') ?>" method="post">
            <div class="alert-box-title">账户充值<a class="close" href="javascript:"><i class="fa fa-close"></i></a></div>
            <div class="recharge-content">
                <label for="recharge-amount">充值金额</label>
                <input type="text" id="recharge-amount" name="value" placeholder="请输入充值金额"><span>元</span>
            </div>
            <div class="pays recharge-content">
                <input type="radio" checked class="pay-choice">
                <img src="images/Pay.png" alt="">
            </div>
            <input type="submit" class="recharge-money" tabindex="5" id="J_enrollstatic" value="充值">
        </form>
    </div>
</div>
</body>
</html>